package com.money.tracker.system.controller;


import com.money.tracker.common.entity.rsp.IResponse;
import com.money.tracker.system.entity.SysDictType;
import com.money.tracker.system.service.ISysDictTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 字典类型表 前端控制器
 * </p>
 *
 * @author zhangshuai
 * @since 2024-11-28
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/system/dict/type")
public class SysDictTypeController {
    private final ISysDictTypeService dictTypeService;


    /**
     * 获取字典选择框列表
     */
    @PostMapping("/list")
    public IResponse<List<SysDictType>> list() {
        return IResponse.success(dictTypeService.list());
    }
}
